package com.aegean.MonitorExamSYS.center.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.aegean.MonitorExamSYS.center.business.CenterBusiness;
import com.aegean.MonitorExaxSYS.model.MessageBox;
import com.opensymphony.xwork2.ActionSupport;
@Controller("ShowMessageBox")
@Scope("prototype")
public class ShowMessageBox extends ActionSupport {
	@Resource
	CenterBusiness business;
     private int status;//状态
     private int conduction_Id;
     private int state;
     private int start;
     private int limit;
     private int total;
     
     public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	private List<MessageBox> messages;
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	public int getConduction_Id() {
		return conduction_Id;
	}
	public void setConduction_Id(int conduction_Id) {
		this.conduction_Id = conduction_Id;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	
	public List<MessageBox> getMessages() {
		return messages;
	}
	public void setMessages(List<MessageBox> messages) {
		this.messages = messages;
	}
	
	public int getStart() {
		return start;
	}
	public void setStart(int start) {
		this.start = start;
	}
	public int getLimit() {
		return limit;
	}
	public void setLimit(int limit) {
		this.limit = limit;
	}
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		messages=business.showMessages(state, status, conduction_Id, start, limit);
		total=messages.size();
		return SUCCESS;
	}
	
}
